package com.group2.bankonline.service.impl;

import com.group2.bankonline.pojo.Transrecord;
import com.group2.bankonline.mapper.TransrecordMapper;
import com.group2.bankonline.service.ITransrecordService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author syf
 * @since 2024-07-11
 */
@Service
public class TransrecordServiceImpl extends ServiceImpl<TransrecordMapper, Transrecord> implements ITransrecordService {

    @Override
    public List<Transrecord> getByAidOrOid(int id) {
        return baseMapper.selectByAidOrOid(id);
    }

    @Override
    public List<Transrecord> getByType(int id, int transtypeId) {
        return baseMapper.selectByType(id,transtypeId);
    }

    @Override
    public List<Transrecord> getByMoney(int id, int money1, int money2) {
        return baseMapper.selectByMoney(id,money1,money2);
    }

    @Override
    public List<Transrecord> getByDate(int id, String date) {
        return baseMapper.selectByDate(id, date);
    }


    @Override
    public List<Transrecord> getByAidAndOid(int aid,int oid) {
        return baseMapper.selectByAidAndOid(aid,oid);
    }

    @Override
    public void saveRecord(Transrecord transrecord) {
        baseMapper.saveRecord(transrecord);
    }


}
